﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace DatingSoonMVC2008.Library
{
    public class IdentityCard
    {
        private int _userID;

        public int UserID
        {
            get { return _userID; }
            set { _userID = value; }
        }

        private string _nickName;

        public string NickName
        {
            get { return _nickName; }
            set { _nickName = value; }
        }

        private string _pictureUrl;

        public string PictureUrl
        {
            get { return _pictureUrl; }
            set { _pictureUrl = value; }
        }

        private string _language;

        public string Language
        {
            get { return _language; }
            set { _language = value; }
        }

        private string _emailAddress;

        public string EmailAddress
        {
            get { return _emailAddress; }
            set { _emailAddress = value; }
        }

        private string _genderCode;

        public string GenderCode
        {
            get { return _genderCode; }
            set { _genderCode = value; }
        }

        private string _seekingCode;

        public string SeekingCode
        {
            get { return _seekingCode; }
            set { _seekingCode = value; }
        }

        private string _countryCode;

        public string CountryCode
        {
            get { return _countryCode; }
            set { _countryCode = value; }
        }

        private string _regionCode;

        public string RegionCode
        {
            get { return _regionCode; }
            set { _regionCode = value; }
        }

        private DateTime _bornDate;

        public DateTime BornDate
        {
            get { return _bornDate; }
            set { _bornDate = value; }
        }

        private string _city;

        public string City
        {
            get { return _city; }
            set { _city = value; }
        }

        private string _description;

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
        private DateTime _registrationDate;

        public DateTime RegistrationDate
        {
            get { return _registrationDate; }
            set { _registrationDate = value; }
        }

        private DateTime _lastLogin;

        public DateTime LastLogin
        {
            get { return _lastLogin; }
            set { _lastLogin = value; }
        }

        private bool _online;

        public bool Online
        {
            get { return _online; }
            set { _online = value; }
        }




        public override bool Equals(object obj)
        {
            IdentityCard objToCompareTo = obj as IdentityCard;
            if (objToCompareTo == null)
                return false;

            if (objToCompareTo.NickName == this.NickName &&
                objToCompareTo.UserID == this.UserID &&
                objToCompareTo.PictureUrl == this.PictureUrl)
                return true;

            return false;
        }
    }
}
